﻿using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class FrontData
{
    public float neckWidth => neckRightPoint.x - neckLeftPoint.x;
    public float backShoulderWidth => backShouldRightPoint.x - backShouldLeftPoint.x;
    public float chestWidth=> chestRightPoint.x - chestLeftPoint.x;
    public float armWidth;
    public float waistWidth=> waistRightPoint.x - waistLeftPoint.x;
    public float armLength;
    public float hipWidth=> hipRightPoint.x - hipLeftPoint.x;
    public float thighWidth;
    public float calfWidth;
    public float pantLength;
    public float tall;
    public Vector2 neckLeftPoint;
    public Vector2 neckRightPoint;
    public Vector2 backShouldLeftPoint;
    public Vector2 backShouldRightPoint;
    public Vector2 chestLeftPoint;
    public Vector2 chestRightPoint;
    public Vector2 waistLeftPoint;
    public Vector2 waistRightPoint;
    public Vector2 hipLeftPoint;
    public Vector2 hipRightPoint;
    public float topPointY;
    public float footPointY;

    public override string ToString()
    {
        return $"tall:{tall} footPointY:{footPointY} chestWidth:{chestWidth} chestLeftPoint:{chestLeftPoint} chestRightPoint:{chestRightPoint} ";
    }
}

[System.Serializable]
public class SideData
{
    public float neckDepth => neckRightPoint.x - neckLeftPoint.x;
    public float chestDepth=> chestRightPoint.x - chestLeftPoint.x;
    public float waisDepth=> waistRightPoint.x - waistLeftPoint.x;
    public float hipDepth=> hipRightPoint.x - hipLeftPoint.x;
    public float thighDepth;
    public float calfDepth;
    public float tall;
    public float topPointY;
    public float footPointY;
    
    public Vector2 neckLeftPoint;
    public Vector2 neckRightPoint;
    public Vector2 chestLeftPoint;
    public Vector2 chestRightPoint;
    public Vector2 waistLeftPoint;
    public Vector2 waistRightPoint;
    public Vector2 hipLeftPoint;
    public Vector2 hipRightPoint;
    
    public override string ToString()
    {
        return $"tall:{tall} chestWidth:{chestDepth} chestLeftPoint:{chestLeftPoint} chestRightPoint:{chestRightPoint} ";
    }
}
public class OutlineData
{
    public int[,] allPoints;
    public Vector2Int topPoint;
}
public class KeyPoints
{
    public Vector2 leftShoulderPoint;
    public Vector2 rightShoulderPoint;
    public Vector2 leftElbowPoint;
    public Vector2 rightElbowPoint;
    public Vector2 leftWristPoint;
    public Vector2 rightWristPoint;
    public Vector2 leftThighPoint;
    public Vector2 leftCalfPoin;
    public Vector2 leftAnklePoint;
    public Vector2 leftFootPoint;
    public Vector2 rightThighPoint;
    public Vector2 rightCalfPoint;
    public Vector2 rightAnklePoint;
    public Vector2 rightFootPoint;
    public Vector2 leftToePoint;
    public Vector2 rightToePoint;

    public List<Vector2> allPoints => new List<Vector2>
    {
        leftShoulderPoint,
        rightShoulderPoint,
        leftElbowPoint,
        rightElbowPoint,
        leftWristPoint,
        rightWristPoint,
        leftThighPoint,
        leftCalfPoin,
        leftAnklePoint,
        leftFootPoint,
        rightThighPoint,
        rightCalfPoint,
        rightAnklePoint,
        rightFootPoint,
        leftToePoint,
        rightToePoint
    };
}